# -*- coding:utf-8 -*-

from django.conf.urls import url
from views import ElevatorListCreateView, ElevatorRetrieveUpdateDestroyAPIView, ElevatorListView,\
    ElevatorPersonListCreateView, ElevatorPersonDetailView, ElevatorStatisticsListView, ThirdElevatorsApiView,\
    ElevatorPersonBindListCreateView, QueryElevatorStatusView, ElevatorStatesPollingView, QueryElevatorForRepair,\
    ElevatorAndPersonForElevatorFittingsListView, ElevatorFittingsListCreateView, ElevatorFittingsDetailView, \
    ElevatorFittingsDownView, ElevatorFollowedView
from manufacturer.views_register import ManufacturerListCreateView

urlpatterns = [
    url(r"^elevator/batch_bind/$", ElevatorPersonBindListCreateView.as_view(), name="elevator_batch_bind"),  # 电梯批量绑定人员
    url(r"^elevator/$", ElevatorListCreateView.as_view(), name="elevator_list_create"),
    url(r"^elevator/follow/$", ElevatorFollowedView.as_view(), name="elevator_list_create"),
    url(r"^elevator/(?P<pk>\d+)/$", ElevatorRetrieveUpdateDestroyAPIView.as_view(), name="retrieve_update_or_delete"),
    url(r"^elevator/choice/$", ElevatorListView.as_view(), name="choice_elevator"),
    url(r"^elevator/manufacturer/$", ManufacturerListCreateView.as_view(), name="list-create"),
    # url(r"^elevator/destroy/(?P<pk>\d+)/$", ElevatorDestroyAPIView.as_view(), name="destroy"),
    url(r"^bind/$", ElevatorPersonListCreateView.as_view(), name='create'),
    url(r"^detail/(?P<pk>\d+)/$", ElevatorPersonDetailView.as_view(), name='detail'),
    url(r"^statistics/$", ElevatorStatisticsListView.as_view(), name='list'),
    url(r"^third/$", ThirdElevatorsApiView.as_view(), name='count'),
    url(r"^sys/$", QueryElevatorStatusView.as_view(), name="dev-status"),
    url(r"^elevator/polling/$", ElevatorStatesPollingView.as_view(), name="status-polling"),
    url(r"^elevator/repair/$", QueryElevatorForRepair.as_view(), name="elevator-for-repair"),
    url(r"^monitor/$", ElevatorListCreateView.as_view(), name="elevator_list_create"),
    url(r"^fittings/persons/$", ElevatorAndPersonForElevatorFittingsListView.as_view(), name="elevator_list_create"),
    url(r"^fittings/$", ElevatorFittingsListCreateView.as_view(), name="elevator_list_create"),
    url(r"^fittings/download/$", ElevatorFittingsDownView.as_view(), name="elevator_list_create"),
    url(r"^fittings/(?P<pk>\d+)/$", ElevatorFittingsDetailView.as_view(), name="elevator_list_create"),
]